home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-11-14 | 1.8 KB | 75 lines | [TEXT/CWIE] |
- // TestGestalt.h
-
- #pragma once
- #include <MixedMode.h>
- #include <Gestalt.h>
- #include "AfterDarkGestalt.h"
-
- // BlackWatch defines an additional SaverCommand to put the screen saver into
- // "deep sleep" mode, in which it can only be awakened by a gestaltSaverWakeUp
- // or gestaltSaverOff command.
-
- #define gestaltSaverDeepSleep (gestaltSaverSleep + 128)
-
- // After Dark's SDK didn't use universal procedure pointers,
- // so define them here.
-
- #if GENERATINGCFM
- typedef UniversalProcPtr SaverControlUPP;
- #else
- typedef SaverControlProcPtr SaverControlUPP;
- #endif
-
- enum {
- uppSaverControlProcInfo = kPascalStackBased
- | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(SaverCommand)))
- };
-
- #if GENERATINGCFM
- #define NewSaverControlProc(userRoutine) \
- (SaverControlUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppSaverControlProcInfo, GetCurrentArchitecture())
- #else
- #define NewSaverControlProc(userRoutine) \
- ((SaverControlUPP) (userRoutine))
- #endif
-
- #if GENERATINGCFM
- #define CallSaverControlProc(userRoutine, command) \
- CallUniversalProc((UniversalProcPtr)(userRoutine), uppSaverControlProcInfo, (command))
- #else
- #define CallSaverControlProc(userRoutine, command) \
- (*(userRoutine))((command))
- #endif
-
- //------------------------------------------------------------------------
- // constant definitions
-
- /* menu bar */
- #define MBAR_ID 256
-
- /* menus */
- #define APPLE_ID 256
- #define FILE_ID 257
- #define EDIT_ID 258
-
- /* menu items */
- #define ABOUT_ITEM 1
- #define QUIT_ITEM 1
- #define UNDO_ITEM 1
- #define CUT_ITEM 3
- #define COPY_ITEM 4
- #define PASTE_ITEM 5
- #define CLEAR_ITEM 6
-
- /* windows, dialogs, alerts */
- #define TEST_DLOG 128
-
- /* dialog items */
- #define QUIT_BTN 1
- #define SLEEP_BTN 2
- #define DSLEEP_BTN 3
- #define OFF_BTN 4
- #define ON_BTN 5
-
-